package schach.server.model;

import java.io.Serializable;

public class Feld implements Serializable{

	private int x;
	private int y;
	private boolean black;
	private Figur figur;
	
	public Feld(int x, int y, boolean black){
		this.x = x;
		this.y = y;
		this.black = black;
	}
	public Feld(int x, int y){
		this.x = x;
		this.y = y;
	}
	public void setFigur(Figur figur){
		this.figur = figur;
	}
	public Figur getFigur(){
		return figur;
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public boolean isBlack() {
		return black;
	}
	
	public String toString(){
		int position = getX()*10 + getY();
		if (position < 10)
			return "0" + getY();
		else
			return "" + position;
	}
}
